<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

use think\facade\Route;

/**
 * 题目前台路由
 */

// 题目前台路由组
Route::group('question', function () {
    // 获取分类列表
    Route::get('categories', 'v1.QuestionController/categories');
    // 获取题目列表
    Route::get('list', 'v1.QuestionController/index');
    // 获取题目详情
    Route::get('detail/:id', 'v1.QuestionController/detail');
    // 获取选项解析（解析题）
    Route::post('get_analysis', 'v1.QuestionController/getAnalysis');
    // 提交答题并计算得分（分值题）
    Route::post('submit_answers', 'v1.QuestionController/submitAnswers');
})->middleware([
    \app\http\middleware\AllowOriginMiddleware::class,
]);

